# runs the thing over n generations
mother<-function(n=1000, ngens.init=50, ngens=100, maxX=70, spY=20, steps=40, K=20, lambda=3, d.cost=0, mutn=0.05, plot=T){
	pop<-init.inds(n, maxX, spY)
	hab<-init.hab(maxX, spY, 0)
	nbrs<-neighbours.init(maxX, spY) #reveal all neighbours
	for (i in 1:ngens.init){
		pop<-repro.disp(pop, hab, maxX, spY, K, lambda, d.cost, nbrs, mutn)
		if (plot==T) plotter(pop, maxX, spY, K)
	}
	hab<-init.hab(maxX, spY, steps)
	for (i in 1:ngens){
		pop<-repro.disp(pop, hab, maxX, spY, K, lambda, d.cost, nbrs, mutn)
		if (plot==T) plotter(pop, maxX, spY, K)
	}
	pop
}